package org.cmodel.example;

import com.gitee.starblues.loader.DevelopmentMode;
import com.gitee.starblues.loader.launcher.SpringMainBootstrap;
import com.gitee.starblues.loader.launcher.SpringBootstrap;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Application implements SpringBootstrap {

//    public static void main(String[] args) {
//        SpringMainBootstrap.launch(Application.class, args);
//    }
//
//    @Override
//    public void run(String[] args) throws Exception {
//        // 在该实现方法中, 和SpringBoot使用方式一致
//        SpringApplication.run(Application.class, args);
//    }


    public static void main(String[] args) throws Exception{
        SpringMainBootstrap.launch(Application.class, args);
    }

    @Override
    public void run(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public String developmentMode() {
        return DevelopmentMode.ISOLATION;
    }
}
